package de.jabc.adapter.bio.ebi;

import de.metaframe.jabc.framework.execution.ExecutionEnvironment;
import de.metaframe.jabc.framework.execution.LightweightExecutionEnvironmentAdapter;
import de.metaframe.jabc.framework.sib.parameter.ContextExpression;
import de.metaframe.jabc.framework.sib.parameter.ContextKey;

/**
 * This class provides the service adapters for the SIBs. These service adapters
 * are used when tracing a SIB in the jABC.
 * 
 * @author anna-lena
 * @version $Revision:2737 $ $Date:2008-01-23 15:46:48 +0100 (Mi, 23 Jan 2008) $
 */
public class ServiceAdapter {

	/**
	 * Calls the FetchData operation of the EBI's WSDBFetch web service.
	 * 
	 * @param environment
	 * @param db
	 * @param id
	 * @param format
	 * @param style
	 * @param entry
	 * @return
	 */
	public static String callWSDBFetch(ExecutionEnvironment environment,
			ContextExpression db, ContextExpression id,
			ContextExpression format, ContextExpression style, ContextKey entry) {

		return LightweightServiceAdapter.callWSDBFetch(
				new LightweightExecutionEnvironmentAdapter(environment),
				db.asFoundation(), id.asFoundation(), format.asFoundation(),
				style.asFoundation(), entry.asFoundation());

	}

	/**
	 * Calls the ArrayExpress web service for experiments.
	 * 
	 * @param environment
	 * @param keywords
	 * @param accession
	 * @param array
	 * @param ef
	 * @param efv
	 * @param expdesign
	 * @param exptype
	 * @param gxa
	 * @param pmid
	 * @param sa
	 * @param species
	 * @param expandefo
	 * @param directsub
	 * @param resultkey
	 * @return
	 */
	public static String callArrayExpressExperiments(
			ExecutionEnvironment environment, ContextExpression keywords,
			ContextExpression accession, ContextExpression array,
			ContextExpression ef, ContextExpression efv,
			ContextExpression expdesign, ContextExpression exptype,
			ContextExpression gxa, ContextExpression pmid,
			ContextExpression sa, ContextExpression species, boolean expandefo,
			ContextKey resultkey) {

		return LightweightServiceAdapter.callArrayExpressExperiments(
				new LightweightExecutionEnvironmentAdapter(environment),
				keywords.asFoundation(), accession.asFoundation(),
				array.asFoundation(), ef.asFoundation(), efv.asFoundation(),
				expdesign.asFoundation(), exptype.asFoundation(),
				gxa.asFoundation(), pmid.asFoundation(), sa.asFoundation(),
				species.asFoundation(), expandefo, resultkey.asFoundation());
	}

	/**
	 * Calls the ArrayExpress web service for files.
	 * 
	 * @param environment
	 * @param keywords
	 * @param accession
	 * @param array
	 * @param ef
	 * @param efv
	 * @param expdesign
	 * @param exptype
	 * @param gxa
	 * @param pmid
	 * @param sa
	 * @param species
	 * @param expandefo
	 * @param directsub
	 * @param resultkey
	 * @return
	 */
	public static String callArrayExpressFiles(
			ExecutionEnvironment environment, ContextExpression keywords,
			ContextExpression accession, ContextExpression array,
			ContextExpression ef, ContextExpression efv,
			ContextExpression expdesign, ContextExpression exptype,
			ContextExpression gxa, ContextExpression pmid,
			ContextExpression sa, ContextExpression species, boolean expandefo,
			ContextKey resultkey) {

		return LightweightServiceAdapter.callArrayExpressExperiments(
				new LightweightExecutionEnvironmentAdapter(environment),
				keywords.asFoundation(), accession.asFoundation(),
				array.asFoundation(), ef.asFoundation(), efv.asFoundation(),
				expdesign.asFoundation(), exptype.asFoundation(),
				gxa.asFoundation(), pmid.asFoundation(), sa.asFoundation(),
				species.asFoundation(), expandefo, resultkey.asFoundation());
	}

	/**
	 * Calls the Makenucseq Soapblab web service.
	 * 
	 * @param environment
	 * @param result
	 * @return
	 */
	public static String callMakenucseq(ExecutionEnvironment environment,
			ContextExpression amount, ContextExpression length,
			ContextKey result) {

		return LightweightServiceAdapter.callMakenucseq(
				new LightweightExecutionEnvironmentAdapter(environment),
				amount.asFoundation(), length.asFoundation(),
				result.asFoundation());
	}

	/**
	 * Calls the Makeprotseq Soapblab web service.
	 * 
	 * @param environment
	 * @param result
	 * @return
	 */
	public static String callMakeprotseq(ExecutionEnvironment environment,
			ContextExpression amount, ContextExpression length,
			ContextKey result) {

		return LightweightServiceAdapter.callMakeprotseq(
				new LightweightExecutionEnvironmentAdapter(environment),
				amount.asFoundation(), length.asFoundation(),
				result.asFoundation());
	}

	/**
	 * Calls the Getorf Soapblab web service.
	 * 
	 * @param sequence
	 * @param result
	 * @return
	 */
	public static String callGetorf(ExecutionEnvironment environment,
			ContextExpression sequence, ContextKey result) {

		return LightweightServiceAdapter.callGetorf(
				new LightweightExecutionEnvironmentAdapter(environment),
				sequence.asFoundation(), result.asFoundation());
	}

	/**
	 * Calls the Emma Soapblab web service.
	 * 
	 * @param sequence
	 * @param result
	 * @return
	 */
	public static String callEmma(ExecutionEnvironment environment,
			ContextExpression sequence, ContextKey resultAlignment,
			ContextKey resultTree) {

		return LightweightServiceAdapter.callEmma(
				new LightweightExecutionEnvironmentAdapter(environment),
				sequence.asFoundation(), resultAlignment.asFoundation(),
				resultTree.asFoundation());
	}

	/**
	 * Calls the garnier Soapblab web service.
	 * 
	 * @param environment
	 * @param sequence
	 * @param result
	 * @return
	 */
	public static String callGarnier(ExecutionEnvironment environment,
			ContextExpression sequence, ContextKey result) {

		return LightweightServiceAdapter.callGarnier(
				new LightweightExecutionEnvironmentAdapter(environment),
				sequence.asFoundation(), result.asFoundation());

	}

	/**
	 * Calls the scopparse Soapblab web service.
	 * 
	 * @param environment
	 * @param class
	 * @param des
	 * @param result
	 * @return
	 */
	public static String callScopparse(ExecutionEnvironment environment,
			ContextExpression classs, ContextExpression des, ContextKey result) {

		return LightweightServiceAdapter.callScopparse(
				new LightweightExecutionEnvironmentAdapter(environment),
				classs.asFoundation(), des.asFoundation(),
				result.asFoundation());

	}

	/**
	 * Calls the ssematch Soapblab web service.
	 * 
	 * @param environment
	 * @param dcfnfile
	 * @param ssinfile
	 * @param result
	 * @return
	 */
	public static String callSsematch(ExecutionEnvironment environment,
			ContextExpression dcf, ContextExpression ss, ContextKey resultss,
			ContextKey resultse) {

		return LightweightServiceAdapter.callSsematch(
				new LightweightExecutionEnvironmentAdapter(environment),
				dcf.asFoundation(), ss.asFoundation(), resultss.asFoundation(),
				resultse.asFoundation());

	}

	/**
	 * Calls the EBI's NCBI BLAST web service.
	 * 
	 * @param environment
	 * @param email
	 * @param title
	 * @param program
	 * @param matrix
	 * @param alignments
	 * @param scores
	 * @param exp
	 * @param dropoff
	 * @param match_scores
	 * @param gapopen
	 * @param gapext
	 * @param filter
	 * @param seqrange
	 * @param gapalign
	 * @param align
	 * @param stype
	 * @param sequence
	 * @param database
	 * @param resultkey
	 * @return
	 */
	public static String callNcbiBlast(ExecutionEnvironment environment,
			ContextExpression email, ContextExpression title,
			ContextExpression program, ContextExpression matrix,
			ContextExpression alignments, ContextExpression scores,
			ContextExpression exp, ContextExpression dropoff,
			ContextExpression match_scores, ContextExpression gapopen,
			ContextExpression gapext, ContextExpression filter,
			ContextExpression seqrange, ContextExpression gapalign,
			ContextExpression align, ContextExpression stype,
			ContextExpression sequence, ContextExpression database,
			ContextKey result_out, ContextKey result_sequence,
			ContextKey result_ids, ContextKey result_xml) {

		return LightweightServiceAdapter.callNcbiBlast(
				new LightweightExecutionEnvironmentAdapter(environment),
				email.asFoundation(), title.asFoundation(),
				program.asFoundation(), matrix.asFoundation(),
				alignments.asFoundation(), scores.asFoundation(),
				exp.asFoundation(), dropoff.asFoundation(),
				match_scores.asFoundation(), gapopen.asFoundation(),
				gapext.asFoundation(), filter.asFoundation(),
				seqrange.asFoundation(), gapalign.asFoundation(),
				align.asFoundation(), stype.asFoundation(),
				sequence.asFoundation(), database.asFoundation(),
				result_out.asFoundation(), result_sequence.asFoundation(),
				result_ids.asFoundation(), result_xml.asFoundation());
	}

	/**
	 * Calls the EBI's WUBlast web service.
	 * 
	 * @param environment
	 * @param email
	 * @param title
	 * @param program
	 * @param exp
	 * @param alignments
	 * @param scores
	 * @param align
	 * @param matrix
	 * @param stats
	 * @param sensitivity
	 * @param topcombon
	 * @param viewfilter
	 * @param filter
	 * @param strand
	 * @param sort
	 * @param stype
	 * @param sequence
	 * @param database
	 * @param result_out
	 * @param result_sequence
	 * @param result_ids
	 * @param result_xml
	 * @return
	 */
	public static String callWuBlast(ExecutionEnvironment environment,
			ContextExpression email, ContextExpression title,
			ContextExpression program, ContextExpression exp,
			ContextExpression alignments, ContextExpression scores,
			ContextExpression align, ContextExpression matrix,
			ContextExpression stats, ContextExpression sensitivity,
			ContextExpression topcombon, ContextExpression viewfilter,
			ContextExpression filter, ContextExpression strand,
			ContextExpression sort, ContextExpression stype,
			ContextExpression sequence, ContextExpression database,
			ContextKey result_out, ContextKey result_error,
			ContextKey result_sequence, ContextKey result_ids,
			ContextKey result_xml) {

		return LightweightServiceAdapter.callWuBlast(
				new LightweightExecutionEnvironmentAdapter(environment),
				email.asFoundation(), title.asFoundation(),
				program.asFoundation(), exp.asFoundation(),
				alignments.asFoundation(), scores.asFoundation(),
				align.asFoundation(), matrix.asFoundation(),
				stats.asFoundation(), sensitivity.asFoundation(),
				topcombon.asFoundation(), viewfilter.asFoundation(),
				filter.asFoundation(), strand.asFoundation(),
				sort.asFoundation(), stype.asFoundation(),
				sequence.asFoundation(), database.asFoundation(),
				result_out.asFoundation(), result_error.asFoundation(),
				result_sequence.asFoundation(), result_ids.asFoundation(),
				result_xml.asFoundation());
	}

	/**
	 * Call the EBI's ClustalW2 Phylogeny web service.
	 * 
	 * @param environment
	 * @param email
	 * @param title
	 * @param tree
	 * @param kimura
	 * @param tossgaps
	 * @param clustering
	 * @param pim
	 * @param sequence
	 * @param resultkey
	 * @return
	 */
	public static String callClustalwPhylogeny(
			ExecutionEnvironment environment, ContextExpression email,
			ContextExpression title, ContextExpression tree,
			ContextExpression kimura, ContextExpression tossgaps,
			ContextExpression clustering, ContextExpression pim,
			ContextExpression sequence, ContextKey resultOut,
			ContextKey resultSequence, ContextKey resultTree) {

		return LightweightServiceAdapter.callClustalwPhylogeny(
				new LightweightExecutionEnvironmentAdapter(environment),
				email.asFoundation(), title.asFoundation(),
				tree.asFoundation(), kimura.asFoundation(),
				tossgaps.asFoundation(), clustering.asFoundation(),
				pim.asFoundation(), sequence.asFoundation(),
				resultOut.asFoundation(), resultSequence.asFoundation(),
				resultTree.asFoundation());

	}

	/**
	 * Calls the EBI's PSI SEARCH web service
	 * 
	 * @param environment
	 * @param email
	 * @param title
	 * @param matrix
	 * @param gapopen
	 * @param gapext
	 * @param expthr
	 * @param mask
	 * @param psithr
	 * @param scores
	 * @param alignments
	 * @param scoreformat
	 * @param sequence
	 * @param database
	 * @param previousjobid
	 * @param selectedhits
	 * @param cpfile
	 * @param resultJobid
	 * @param result
	 * @return
	 */
	public static String callPsiSearch(ExecutionEnvironment environment,
			ContextExpression email, ContextExpression title,
			ContextExpression matrix, ContextExpression gapopen,
			ContextExpression gapext, ContextExpression expthr,
			ContextExpression mask, ContextExpression psithr,
			ContextExpression scores, ContextExpression alignments,
			ContextExpression scoreformat, ContextExpression sequence,
			ContextExpression database, ContextExpression previousjobid,
			ContextExpression selectedhits, ContextExpression cpfile,
			ContextKey resultJobid, ContextKey resultOut,
			ContextKey resultSequence, ContextKey resultIds,
			ContextKey resultPreselectedIds, ContextKey resultXml) {

		return LightweightServiceAdapter.callPsiSearch(
				new LightweightExecutionEnvironmentAdapter(environment),
				email.asFoundation(), title.asFoundation(),
				matrix.asFoundation(), gapopen.asFoundation(),
				gapext.asFoundation(), expthr.asFoundation(),
				mask.asFoundation(), psithr.asFoundation(),
				scores.asFoundation(), alignments.asFoundation(),
				scoreformat.asFoundation(), sequence.asFoundation(),
				database.asFoundation(), previousjobid.asFoundation(),
				selectedhits.asFoundation(), cpfile.asFoundation(),
				resultJobid.asFoundation(), resultOut.asFoundation(),
				resultSequence.asFoundation(), resultIds.asFoundation(),
				resultPreselectedIds.asFoundation(), resultXml.asFoundation());
	}

	/**
	 * Calls the EBI'S emboss pepinfo web service.
	 * 
	 * @param environment
	 * @param email
	 * @param title
	 * @param hwindow
	 * @param sequence
	 * @param resultkey
	 * @return
	 */
	public static String callPepinfo(ExecutionEnvironment environment,
			ContextExpression email, ContextExpression title,
			ContextExpression hwindow, ContextExpression sequence,
			ContextKey resultkey) {
		return LightweightServiceAdapter.callPepinfo(
				new LightweightExecutionEnvironmentAdapter(environment),
				email.asFoundation(), title.asFoundation(),
				hwindow.asFoundation(), sequence.asFoundation(),
				resultkey.asFoundation());
	}

	/**
	 * Calls the EBI's EMBOSS NEEDLE web service.
	 * 
	 * @param environment
	 * @param email
	 * @param title
	 * @param matrix
	 * @param gapopen
	 * @param gapextend
	 * @param endweight
	 * @param endopen
	 * @param endext
	 * @param format
	 * @param stype
	 * @param asequence
	 * @param bsequence
	 * @param resultOut
	 * @param resultAln
	 * @return
	 */
	public static String callNeedle(ExecutionEnvironment environment,
			ContextExpression email, ContextExpression title,
			ContextExpression matrix, ContextExpression gapopen,
			ContextExpression gapextend, ContextExpression endweight,
			ContextExpression endopen, ContextExpression endext,
			ContextExpression format, ContextExpression stype,
			ContextExpression asequence, ContextExpression bsequence,
			ContextKey resultOut, ContextKey resultAln) {

		return LightweightServiceAdapter.callNeedle(
				new LightweightExecutionEnvironmentAdapter(environment),
				email.asFoundation(), title.asFoundation(),
				matrix.asFoundation(), gapopen.asFoundation(),
				gapextend.asFoundation(), endweight.asFoundation(),
				endopen.asFoundation(), endext.asFoundation(),
				format.asFoundation(), stype.asFoundation(),
				asequence.asFoundation(), bsequence.asFoundation(),
				resultOut.asFoundation(), resultAln.asFoundation());

	}

	/**
	 * Calls the EBI's EMBOSS WATER web service.
	 * 
	 * @param environment
	 * @param email
	 * @param title
	 * @param matrix
	 * @param gapopen
	 * @param gapext
	 * @param format
	 * @param stype
	 * @param asequence
	 * @param bsequence
	 * @param resultOut
	 * @param resultAln
	 * @return
	 */
	public static String callWater(ExecutionEnvironment environment,
			ContextExpression email, ContextExpression title,
			ContextExpression matrix, ContextExpression gapopen,
			ContextExpression gapext, ContextExpression format,
			ContextExpression stype, ContextExpression asequence,
			ContextExpression bsequence, ContextKey resultOut,
			ContextKey resultAln) {

		return LightweightServiceAdapter.callWater(
				new LightweightExecutionEnvironmentAdapter(environment),
				email.asFoundation(), title.asFoundation(),
				matrix.asFoundation(), gapopen.asFoundation(),
				gapext.asFoundation(), format.asFoundation(),
				stype.asFoundation(), asequence.asFoundation(),
				bsequence.asFoundation(), resultOut.asFoundation(),
				resultAln.asFoundation());
	}

	/**
	 * Calls the EBI's EMBOSS TRANSEQ web service.
	 * 
	 * @param environment
	 * @param email
	 * @param title
	 * @param frame
	 * @param codontable
	 * @param regions
	 * @param trim
	 * @param reverse
	 * @param sequence
	 * @param result
	 * @return
	 */
	public static String callTranseq(ExecutionEnvironment environment,
			ContextExpression email, ContextExpression title,
			ContextExpression frame, ContextExpression codontable,
			ContextExpression regions, ContextExpression trim,
			ContextExpression reverse, ContextExpression sequence,
			ContextKey result) {

		return LightweightServiceAdapter.callTranseq(
				new LightweightExecutionEnvironmentAdapter(environment),
				email.asFoundation(), title.asFoundation(),
				frame.asFoundation(), codontable.asFoundation(),
				regions.asFoundation(), trim.asFoundation(),
				reverse.asFoundation(), sequence.asFoundation(),
				result.asFoundation());

	}

	public static String callBacktranseq(ExecutionEnvironment environment,
			ContextExpression email, ContextExpression title,
			ContextExpression codontable, ContextExpression sequence,
			ContextKey result) {

		return LightweightServiceAdapter.callBacktranseq(
				new LightweightExecutionEnvironmentAdapter(environment),
				email.asFoundation(), title.asFoundation(),
				codontable.asFoundation(), sequence.asFoundation(),
				result.asFoundation());

	}

	/**
	 * Calls the EBI's EMBOSS STRETCHER web service.
	 * 
	 * @param environment
	 * @param email
	 * @param title
	 * @param matrix
	 * @param gapopen
	 * @param gapext
	 * @param format
	 * @param stype
	 * @param asequence
	 * @param bsequence
	 * @param resultOut
	 * @param resultAln
	 * @return
	 */
	public static String callStretcher(ExecutionEnvironment environment,
			ContextExpression email, ContextExpression title,
			ContextExpression matrix, ContextExpression gapopen,
			ContextExpression gapext, ContextExpression format,
			ContextExpression stype, ContextExpression asequence,
			ContextExpression bsequence, ContextKey resultOut,
			ContextKey resultAln) {

		return LightweightServiceAdapter.callStretcher(
				new LightweightExecutionEnvironmentAdapter(environment),
				email.asFoundation(), title.asFoundation(),
				matrix.asFoundation(), gapopen.asFoundation(),
				gapext.asFoundation(), format.asFoundation(),
				stype.asFoundation(), asequence.asFoundation(),
				bsequence.asFoundation(), resultOut.asFoundation(),
				resultAln.asFoundation());
	}

	/**
	 * Calls the EBI's EMBOSS MATCHER web service.
	 * 
	 * @param environment
	 * @param email
	 * @param alternatives
	 * @param title
	 * @param matrix
	 * @param gapopen
	 * @param gapext
	 * @param format
	 * @param stype
	 * @param asequence
	 * @param bsequence
	 * @param resultOut
	 * @param resultAln
	 * @return
	 */
	public static String callMatcher(ExecutionEnvironment environment,
			ContextExpression email, ContextExpression alternatives,
			ContextExpression title, ContextExpression matrix,
			ContextExpression gapopen, ContextExpression gapext,
			ContextExpression format, ContextExpression stype,
			ContextExpression asequence, ContextExpression bsequence,
			ContextKey resultOut, ContextKey resultAln) {

		return LightweightServiceAdapter.callMatcher(
				new LightweightExecutionEnvironmentAdapter(environment),
				email.asFoundation(), alternatives.asFoundation(),
				title.asFoundation(), matrix.asFoundation(),
				gapopen.asFoundation(), gapext.asFoundation(),
				format.asFoundation(), stype.asFoundation(),
				asequence.asFoundation(), bsequence.asFoundation(),
				resultOut.asFoundation(), resultAln.asFoundation());
	}

	/**
	 * Calls the EBI's EMBOSS Pepwindow web service.
	 * 
	 * @param environment
	 * @param email
	 * @param title
	 * @param window
	 *            - Window size for hydropathy averaging.Default is 10.
	 * @param normalize
	 *            - Normalize data values. Default is false.
	 * @param sequence
	 *            - Protein sequence to analyse. The use of fasta formatted
	 *            sequence is recommended.
	 * @param result
	 *            - address of file with resulting graph
	 * @return - resulting branch
	 */
	public static String callPepwindow(ExecutionEnvironment environment,
			ContextExpression email, ContextExpression title,
			ContextExpression window, ContextExpression normalize,
			ContextExpression sequence, ContextKey result) {
		return LightweightServiceAdapter.callPepwindow(
				new LightweightExecutionEnvironmentAdapter(environment),
				email.asFoundation(), title.asFoundation(),
				window.asFoundation(), normalize.asFoundation(),
				sequence.asFoundation(), result.asFoundation());
	}

	public static String callBacktranambig(ExecutionEnvironment environment,
			ContextExpression email, ContextExpression title,
			ContextExpression codontable, ContextExpression sequence,
			ContextKey result) {
		return LightweightServiceAdapter.callBacktranambig(
				new LightweightExecutionEnvironmentAdapter(environment),
				email.asFoundation(), title.asFoundation(),
				codontable.asFoundation(), sequence.asFoundation(),
				result.asFoundation());
	}

	public static String callReadseq(ExecutionEnvironment environment,
			ContextExpression email, ContextExpression title,
			ContextExpression inputformat, ContextExpression outputformat,
			ContextExpression outputcase, ContextExpression reverse,
			ContextExpression degap, ContextExpression transymbol,
			ContextExpression feature, ContextExpression fthandle,
			ContextExpression subrange, ContextExpression sequence,
			ContextKey result) {
		return LightweightServiceAdapter.callReadseq(
				new LightweightExecutionEnvironmentAdapter(environment),
				email.asFoundation(), title.asFoundation(),
				inputformat.asFoundation(), outputformat.asFoundation(),
				outputcase.asFoundation(), reverse.asFoundation(),
				degap.asFoundation(), transymbol.asFoundation(),
				feature.asFoundation(), fthandle.asFoundation(),
				subrange.asFoundation(), sequence.asFoundation(),
				result.asFoundation());
	}

	/**
	 * Calls the EBI's EMBOSS SIXPACK web service.
	 * 
	 * @param environment
	 * @param email
	 * @param title
	 * @param codontable
	 *            - Genetic code table
	 * @param firstorf
	 *            - Count the beginning of a sequence as a possible ORF
	 * @param lastorf
	 *            - Count the end of a sequence as a possible ORF
	 * @param reverse
	 *            - reverse and complement input sequence
	 * @param orfminsize
	 *            - Minimum size of ORFs
	 * @param sequence
	 *            - Input sequence
	 * @param resultOut
	 * @return
	 */
	public static String callSixpack(ExecutionEnvironment environment,
			ContextExpression email, ContextExpression title,
			ContextExpression codontable, ContextExpression firstorf,
			ContextExpression lastorf, ContextExpression reverse,
			ContextExpression orfminsize, ContextExpression sequence,
			ContextKey resultOut) {

		return LightweightServiceAdapter.callSixpack(
				new LightweightExecutionEnvironmentAdapter(environment),
				email.asFoundation(), title.asFoundation(),
				codontable.asFoundation(), firstorf.asFoundation(),
				lastorf.asFoundation(), reverse.asFoundation(),
				orfminsize.asFoundation(), sequence.asFoundation(),
				resultOut.asFoundation());
	}

	/**
	 * Calls the EBI's EMBOSS Pepstats web service.
	 * 
	 * @param environment
	 * @param email
	 * @param title
	 * @param termini
	 *            - Include termini charges
	 * @param mono
	 *            - Monoisotopic weights
	 * @param sequence
	 *            - Input sequence
	 * @param resultOut
	 * @return
	 */
	public static String callPepstats(ExecutionEnvironment environment,
			ContextExpression email, ContextExpression title,
			ContextExpression termini, ContextExpression mono,
			ContextExpression sequence, ContextKey resultOut) {

		return LightweightServiceAdapter.callPepstats(
				new LightweightExecutionEnvironmentAdapter(environment),
				email.asFoundation(), title.asFoundation(),
				termini.asFoundation(), mono.asFoundation(),
				sequence.asFoundation(), resultOut.asFoundation());
	}

	/**
	 * Calls the EBI's Clustal Omega web service.
	 * 
	 * @param environment
	 * @param email
	 * @param title
	 * @param stype
	 *            - input sequence type
	 * @param guidetreeout
	 *            - enable/disable output of guide tree (guide tree generation
	 *            requires that the “mBed-like clustering guide-tree” is
	 *            disabled)
	 * @param dismatout
	 *            - enable/disable output of distance matrix (distance matrix
	 *            generation requires that the “mBed-like clustering guide-tree”
	 *            is disabled)
	 * @param dealign
	 *            - enable/disable gap removal for input sequences
	 *            (de-alignment)
	 * @param mbed
	 *            - enable/disable mBed-like clustering guide-tree
	 * @param mbediteration
	 *            - enable/disable mBed-like clustering iteration
	 * @param iterations
	 *            - number of iterations
	 * @param gtiterations
	 *            - maximum guild tree iterations
	 * @param hmmiterations
	 *            - maximum HMM iterations
	 * @param outfmt
	 *            - output alignment format
	 * @param sequence
	 *            - Input sequence
	 * @param resultOut
	 * @return
	 */
	public static String callClustalOmega(ExecutionEnvironment environment,
			ContextExpression email, ContextExpression title,
			ContextExpression stype, ContextExpression guidetreeout,
			ContextExpression dismatout, ContextExpression dealign,
			ContextExpression mbed, ContextExpression mbediteration,
			ContextExpression iterations, ContextExpression gtiterations,
			ContextExpression hmmiterations, ContextExpression outfmt,
			ContextExpression sequence, ContextKey resultOut) {

		return LightweightServiceAdapter.callClustalOmega(
				new LightweightExecutionEnvironmentAdapter(environment),
				email.asFoundation(), title.asFoundation(),
				stype.asFoundation(), guidetreeout.asFoundation(),
				dismatout.asFoundation(), dealign.asFoundation(),
				mbed.asFoundation(), mbediteration.asFoundation(),
				iterations.asFoundation(), gtiterations.asFoundation(),
				hmmiterations.asFoundation(), outfmt.asFoundation(),
				sequence.asFoundation(), resultOut.asFoundation());
	}
}
